<?php

class ConexionBD{
    var $url = "localhost";
    var $user = "root";
    var $password = "1234";
    var $database = "app1";
    var $session = null;

    function ConexionBD(){
        $this->session = mysql_connect($this->url, $this->user, $this->password);

        if (!$this->session) {
            die('No se puede conectar a la Base de Datos: ' . mysql_error());
        }

        mysql_select_db($this->database, $this->session) or die("Verifique la Base de Datos");
       
    }

    function CerrarConexionBD(){
        mysql_close($this->session);
    }
}

?>
